﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YAPSAR.Domain
{
    public class WorkUnit
    {
        public virtual int Id { get; set; }
        public virtual ProcessInstance ProcessInstance { get; set; }

        public virtual DateTime TimeFrom { get; set; }
        public virtual DateTime TimeTo { get; set; }

        public virtual int FrequencyKeyboard { get; set; }
        public virtual int FrequencyMouseLeft { get; set; }
        public virtual int FrequencyMouseRight { get; set; }
        public virtual int FrequencyMouseMiddle { get; set; }
        public virtual int DistanceMouseMoved { get; set; }

        public WorkUnit()
        {
        }

        public virtual int FrequencyMouse
        {
            get
            {
                return this.FrequencyMouseLeft + this.FrequencyMouseMiddle + this.FrequencyMouseRight;
            }
        }

        public override string ToString()
        {
            return "WorkUnit: " + this.Id + " (of " + this.ProcessInstance + "), between '" + this.TimeFrom + "' and '" + this.TimeTo + "'";
        }
    }
}
